<p>
  Rho is the rate of change of the value of a derivative with respect to the interest rate. It is usually small and not a big issue in practice unless the option is deep in-the-money and has a long horizon. The interest rate would matter because we need to discount a larger cash flow over a longer horizon. Rho for the European options:
</p>
\[Rho(call)=K(T-t)e^{-r(T-t)}N(d_2)\]
\[Rho(put)=-K(T-t)e^{-r(T-t)}N(-d_2)\]
<div class="section-example-container">

<pre class="python">def rho(self):
    d2 = self.d2()
    if self.type == "c":
        rho = self.k * self.T * (exp(-self.r*self.T)) * self.n(d2)
    elif self.type == "p":
        rho = -self.k * self.T * (exp(-self.r*self.T)) * self.n(-d2)
    return rho
</pre>
</div>

<div class="section-example-container">

<pre class="python">z = rho
norm = matplotlib.colors.Normalize()
fig = plt.figure(figsize=(20,11))
ax = fig.add_subplot(111, projection='3d')
ax.view_init()
ax.plot_wireframe(s, T, z, rstride=1, cstride=1)
ax.plot_surface(s, T, z, facecolors=cm.jet(norm(z)),linewidth=0.001, rstride=1, cstride=1, alpha = 0.9)
ax.set_zlim3d(z.min(), z.max())
ax.set_xlabel('stock price')
ax.set_ylabel('Time to Expiration')
ax.set_zlabel('vega')
m = cm.ScalarMappable(cmap=cm.jet)
m.set_array(z)
cbar = plt.colorbar(m)
</pre>
</div>

<img class="img-responsive" src="https://cdn.quantconnect.com/tutorials/i/Tutorial05-rho.png" alt="The Greeks letters: rho"/>
